package com.zl.credit.util.score;

/**
 * 年收入
 */
public class AnnualIncome {
    public static Integer getAgeScore(Integer annualIncome) {
        if (annualIncome < 10000) {
            return 8;
        } else if (annualIncome >= 10000 && annualIncome < 30000) {
            return ((annualIncome - 10000) / 2000) + 11;
        } else if (annualIncome >= 30000 && annualIncome < 50000) {
            return ((annualIncome - 30000) / 5000) + 21;
        } else if (annualIncome >= 50000 && annualIncome < 100000) {
            return ((annualIncome - 50000) / 10000) + 25;
        } else if (annualIncome >= 100000) {
            return 30;
        } else {
            return 0;
        }
    }
}
